home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form TaskListForm
- Caption = "Task List and List Tabstops"
- ClientHeight = 3330
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 4725
- Height = 3735
- Left = 1035
- LinkTopic = "Form2"
- ScaleHeight = 540
- ScaleWidth = 540
- Top = 1140
- Width = 4845
- Begin ListBox lst_Task
- Height = 2565
- Left = 240
- TabIndex = 1
- Top = 540
- Width = 2715
- End
- Begin CommandButton Cmd_Ok
- Caption = "Ok"
- Height = 555
- Left = 3360
- TabIndex = 0
- Top = 2520
- Width = 1035
- End
- Begin Label Label1
- Caption = "Task names, Task Handles"
- Height = 255
- Left = 240
- TabIndex = 2
- Top = 240
- Width = 2715
- End
- Option Explicit
- Sub Cmd_Ok_Click ()
- Unload Me
- End Sub
- Sub Form_Load ()
- ReDim tablist%(2)
- Dim tabposition%
- Dim dl&
- Dim ts As TASKENTRY
- Dim taskfound%
- tabposition% = 15
- ' Note that dialog units are 4* the average char width
- tablist%(0) = tabposition% * 4
- ' We place a second tab stop - but we won't be
- ' using it in this example.
- tablist%(1) = (tabposition% + 5) * 4
- dl& = SendMessage(lst_Task.hWnd, LB_SETTABSTOPS, 2, tablist%(0))
- ts.dwSize = Len(ts) ' Very important! Initialize size
- taskfound% = TaskFirst(ts)
- Do While taskfound% <> 0
- lst_Task.AddItem NullTermToVBString(ts.szModule) & Chr$(9) & FormattedHex$(ts.hTask, 4)
- taskfound% = TaskNext(ts)
- Loop
- End Sub
-